1. Field of the Invention
The present invention relates to an operating system and, more particularly, to an operating system in which hardware dependencies are transparent to most parts of the operating system.
2. Description of the Related Art
FIG. 1 is a block diagram of the architecture of Microsoft.RTM. Windows NT.TM. operating system 100. The Windows NT operating system 100 is a modular operating system composed of layers. The Window NT operating system 100 includes an executive services system 102 which interacts with hardware 104 associated with a computer system on which the Windows NT operating system 100 executes. The executive services system 102 includes a hardware abstraction layer (HAL) 106, a kernel 108, and a set of services 110-120. The environment subsystems (not shown) which interact with the Windows NT operating system 100 can use any of the services 110-120.
Between the services 110-120 of the Windows NT operating system 100 and the hardware 104 is the HAL 106. Although the kernel 108 and the executive services system 102 could also directly interact with the hardware 104, the primary interaction with the hardware 104 by the Windows NT operating system 100 is through the HAL 106. The HAL 106 is a layer of software provided by the hardware manufacturer that hides (or abstracts) hardware differences from higher layers of the Windows NT operating system 100. As a result, different types of hardware all look alike to an operating system. Hence, it is not necessary to specifically tailor an operating system to the hardware with which it communicates.
The HAL 106 contains routines (function calls) that allow a single device driver to support the same device on numerous hardware platforms. The routines within the HAL 106 are typically called from either the base operating system (e.g., the kernel 108) or from device drivers residing within the I/O Manager 110. Accordingly, the HAL 106 enables device drivers to support a wide variety of input/output (I/O) architectures instead of either being restricted to a single hardware model or needing extensive adaptation for each new hardware platform.
The kernel 108 schedules activities for the computer system to perform. In the Windows NT operating system 100, the kernel 108 schedules the activities into threads. The kernel 108 dispatches threads in a way that ensures that the processor or processors of the computer system are always kept busy. The kernel 108 works closely with the HAL 106. Threads are defined in the context of a process which represents an address space, a set of objects visible to the process, and a set of threads that runs in the context of the process. Objects are resources that can be manipulated by the operating system.
The executive services system 102 includes the set of services including I/O manager 110, object manager 112, security reference monitor 114, process manager 116, local procedure call facility 118, and virtual memory manager 120. These services 110-120 are the interface between user-mode environment subsystems and the kernel 108. The I/O manager 110 manages all input and output for the Windows NT operating system 100. The object manager 112 provides uniform rules for retention, naming and security of objects. The security reference monitor 114 ensures that applications cannot access system resources without authorization. The process manager 116 manages the creation and deletion of processes. The local procedure call facility 118 manages local procedure calls (LPC) which involves message passing between applications and the environment subsystems. The virtual memory manager 120 manages the translation of virtual addresses to physical pages in memory.
FIG. 2 is a block diagram of the I/O manager 110 illustrated in FIG. 1. The I/O manager 110 includes, for example, a cache manager 200, file system drivers 202, network drivers 204 and device drivers 206. According to the Windows NT operating system 100, the architecture within the I/O manager 110 is layered so that separate drivers implement logically distinct layers of processing. For example, drivers in the lowest layer (device drivers 206) manipulate the physical devices of the computer system, while other drivers are then layered on top of the device drivers 206. The higher-level drivers 200, 202 and 204 pass logical I/O requests down to the device drivers 206 which in turn access the physical devices of the computer system on their behalf.
Additional details on the Windows NT operating system can, for example, be found in Microsoft Windows NT Resource Guide (for Windows NT workstation and Windows NT server version 3.51), Microsoft Press, 1995, which is hereby incorporated by reference.
Hardware vendors are able to customize their own HALs to provide functionality beyond what the Microsoft provided HAL provides. During installation, the Windows NT SETUP program determines which hardware platform is being configured and installs the appropriate customized HAL.
A major problem, however, is that a customized or enhanced HAL causes backwards compatibility problems. For example, if the HAL is modified such that it is enhanced to include additional entry points in a static fashion, then device drivers which make use of the additional entry points will likely cause the operating system to crash (with an unrecoverable error) if the HAL in use by the computer system does not have the additional entry points.
Thus, there is a need for techniques to extend the functionality provided by HALs, yet also provide backwards compatibility so that operating system crashes do not occur if the customized or enhanced HAL is not in use.